#ifndef TEST_H
#define TEST_H

#include "testListas.h"
#include "test_tinyxml.h"
#include "testEscenario.h"
#include "testPersistencia.h"
#include "testTextbox.h"
#include "testScenarioElement.h"
#include "testLabel.h"
#include "testScenarioScrollBar.h"
#include "testResize.h"
#include "testScenarioPanel.h"
#include "testButton.h"
#include "testLoadSceneWindow.h"
#include "testScrollBarText.h"
#include "testTextScrollBar.h"
#include "testDragnDrop.h"
#include "testFileChecker.h"
#include "testExceptionLabel.h"
#include "testServer.h"

class Test {
public:
	Test() {
	}

	void menuElegirTest() {
		char opcion = '1';
		while (opcion != '0') {
			this->imprimirMenu();
			cout << "elegir una opcion: " << endl;
			cin >> opcion;
			switch (opcion) {
			case '1': {
				iniciarTestListas();
				break;
			}
			case '2': {
				const string pathXML =
						"./trunk/src/persistencia/archivosXML/versionInicial.xml";
				Test_TinyXML* test_tinyxml = new Test_TinyXML(pathXML.c_str());
				test_tinyxml->leerXML();
				test_tinyxml->escribirXML();
				delete test_tinyxml;
				break;
			}
			case '3': {
				testEscenario();
				break;
			}
			case '4': {
				testFileChecker();
//				Test_Persistencia* test_persistencia = new Test_Persistencia();
//				test_persistencia->run();
//				delete test_persistencia;
				break;
			}
			case '5': {
				testTextbox();
				break;
			}
			case '6': {
				testScenarioElement();
				break;
			}
			case '7': {
				testLabel();
				break;
			}
			case '8': {
				testScenarioScrollBar();
				break;
			}
			case '9': {
				testResize();
				break;
			}

			case 'a': {
				testScenarioPanel();
				break;
			}
			case 'b': {
				testButton();
				break;
			}
			case 'd': {
				testLoadSceneWindow();
				break;
			}
			case 'e': {
				testScrollBarText();
				break;
			}
			case 'f': {
				testTextScrollBar();
				break;
			}
			case 'g':{
				testDragnDrop();
				break;
			}
			case 'h': {
				testExceptionLabel();
				break;
			}
			case 'i': {
				testExceptionLabel();
				break;
			}
			case 'j': {
				testServer();
				break;
			}

			case '0': {
				break;
			}
			default:
				cout << "no se elijio una opcion correcta" << endl;
				break;
			}
		}
		cout << "termino el testeo" << endl;
	}

	void imprimirMenu() {
		cout
				<< "\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"
				<< endl;
		cout << "\t\tMENU:" << endl;
		cout << "1 - test listas" << endl;
		cout << "2 - test tinyxml" << endl;
		cout << "3 - test escenario" << endl;
		cout << "4 - test FileChecker" << endl;
		cout << "5 - test textbox" << endl;
		cout << "6 - test ScenarioElement" << endl;
		cout << "7 - test Label" << endl;
		cout << "8 - test ScenarioScrollBar" << endl;
		cout << "9 - test Resize" << endl;
		cout << "a - test ScenarioPanel" << endl;
		cout << "b - test Button" << endl;
		cout << "d - test LoadSceneWindow" << endl;
		cout << "e - test ScrollBarText" << endl;
		cout << "f - test TextScrollBar" << endl;
		cout << "g - test Drag n Drop" << endl;
		cout << "h - test Exception Label" << endl;
		cout << "j - test Server" << endl;
		cout << "0 - SALIR" << endl;
	}
};
#endif
